Sample invoice for all leases on Portfolio 2 (dxGeneration)
LeasePak Documentation Suite NETSOL website
Document Generation

Overview symbol Document Generation

Sample invoice for all leases on Portfolio 2 (dxGeneration)

The following example shows how to generate documents in batch by using dxGeneration. In this example, the document generated in "sample Invoice" will be used to generate in batch for a particular portfolio. Following steps explain how to generate multiple documents by using dxGeneration:

  1. Create Document by using the steps defined in "Sample Invoice" document.
  2. Use dxGeneration interface to process the generated document in batch.
  3. Create user profile in dxGeneration. Use username and password to connect to the application server.
  4. Create task by providing task and document information to generate documents in batch.


    The generated document must have unique file name set in U0736 Document update. This unique name will be used to create each record returned by custom SQL. In this example the unique is: "Invoice_{lse_s}". Where 'Invoice' is the name of the document. The use of {lse_s} will be replaced by the lease number.


    Connection: Connect to the LeasePak application server. It is required to connect to LeasePak application server in order to access the Custom SQL tab.

    Document ID: Select the document generated by U0736 to create the documents in batch for this task.The dropdown list will be populated by the document IDs generated by U0736 Document update of LeasePak application.

    File Attachment: Select this checkbox to attach the generated document with each record returned by custom SQL. To attach the generated document users must ensure the column name lse_s and app_s defined in the name of the generated document. In this example the name of the document is "Invoice_{lse_s}".

    Output Directory: Select the document directory location to store the generated merged documents by using the selected document ID.

    Log Directory: Select log directory path to maintain the log file of dxGeneration processed task. The log file will be helpful to looking at the error messages found during the execution of the task and in generated documents by dxGeneration.

  5. Write Custom SQL statement by accessing the Task→Custom SQL tab. dxGeneration runs the task on each record returned by the query. The selected columns in this custom SQL must include the base parameters used in the SQLs of the document record setup in U0736 Document update. For this example the custom SQL would be:

    SELECT *
    FROM rls
    WHERE por_s = ' 2'



  6. Process the specified query to generate documents in batch which will be placed in the provided directory location. Once processed, this is how the dxGeneration confirms the processing of the custom SQL and status of the completed task:



  7. Open documents from the specified output directory location provided in the Task→Task Info tab. The .docx file indicates the merging errors found during the execution of custom SQL, whereas the .pdf files are the successfully generated documents.



  8. See the log file of the executed task available in the log directory. This log file contains error and success messages.



  9. Review the output document. This is how the generated document will look: